//
//  GeneralOriginCell.m
//  PASystem
//
//  Created by 刘沿 on 16/8/18.
//  Copyright © 2016年 czd. All rights reserved.
//

#import "GeneralOriginCell.h"

@implementation GeneralOriginCell

+(instancetype)WithGeneralOriginCell{

    return [[[NSBundle mainBundle] loadNibNamed:@"GeneralOriginCell" owner:nil options:nil ] lastObject];

}

- (void)setModel:(GeneralOriginModel *)model{

    _model = model;

    self.ENTERPRISENAME.text = model.ENTERPRISENAME;
    self.CODE.text = model.CODE;
    self.APPLYCODE.text = model.APPLYCODE;

    NSString *string = model.APPLYTIME;
    NSDateFormatter *fmt = [[NSDateFormatter alloc] init];
    fmt.dateFormat = @"MMM d, yyyy HH:mm:ss aa";
    fmt.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en-US"];
    NSDate *date = [fmt dateFromString:string];
    NSDateFormatter *fm = [[NSDateFormatter alloc] init];
    fm.dateFormat = @"yyyy-MM-dd";
    NSString *selfYear = [fm stringFromDate:date];
    
    self.APPLYTIME.text = selfYear;
    
}





@end
